<!DOCTYPE html>
<!-- Reader -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 导航栏-->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script type="text/javascript" src="../static/bootstrap/js/bootstrap.min.js" th:src="@{/bootstrap/js/bootstrap.min.js}"></script>
    <link rel="stylesheet" type="text/css" href="../static/bootstrap/css/bootstrap.css" th:href="@{/bootstrap/css/bootstrap.css}"/>
    <!--  -->

    <link rel="stylesheet" href="/css/iconfont.css">
    <link rel="stylesheet" href="/css/librarian_login.css">
    <style>
        a:link {text-decoration:none;}    /* unvisited link */
        a:visited {text-decoration:none;} /* visited link */
        a:hover {text-decoration:underline;}   /* mouse over link */
        a:active {text-decoration:underline;}  /* selected link */
        #section {
            color:white;
            text-align:center;
            font-size:18px;
            padding:30px;
            display: flex;
            align-items:center;
            justify-content: center;
        }

    </style>
</head>
<body>
<nav class="navbar navbar-dark navbar-fixed-top" role="navigation" style="background-color: black">
    <a class="navbar-brand" style="color: white;font-family: 'Arial Narrow'"><i class="fa fa-cloud fa-lg"></i>Libraby</a>
    <a class="navbar-brand" href="#" th:href="@{/user/login}" style="color: white;font-family: 'Arial Narrow'"><i class="fa fa-user fa-lg"></i>Logout</a>
    <li class="nav-item dropdown">
        <a class="navbar-brand dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="color: white;font-family: 'Arial Narrow'">Reader Management</a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: black">
            <a class="dropdown-item" href="#" th:href="@{/librarian_Changeinfo_Reader}" style="color: white">Reader Account</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="#" th:href="@{/librarian_Changeinfo_Reader}" style="color: white">Pending Account</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="#" th:href="@{/librarian_BR_viewReader}" style="color: white">Borrow Return History</a>
        </div>
    </li>
    <a class="navbar-brand" href="#" th:href="@{/incomerecord}" style="color: white">Income</a>
    <li class="nav-item dropdown">
        <a class="navbar-brand dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="color: white;font-family: 'Arial Narrow'">Public Notice</a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: black">
            <a class="dropdown-item" href="#" th:href="@{/notice}" style="color: white">Publish_Notice</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="#" th:href="@{/notice/update}" style="color: white">Update_Notice</a>
        </div>
    </li>
    <li class="nav-item dropdown">
        <a class="navbar-brand dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="color: white;font-family: 'Arial Narrow'">Pending</a>
        <div class="dropdown-menu dg-dark" aria-labelledby="navbarDropdown" style="background-color: black">
            <a class="dropdown-item" href="#" th:href="@{/borrowmsg}" style="color: white">Borrow</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="#" th:href="@{/returnmsg}"  style="color: white">Return</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="#" th:href="@{/finemsg}" style="color: white">Fine</a>
        </div>
    </li>
    <a class="navbar-brand" href="#" th:href="@{/librarian_book}" style="color: white">Librarian Home</a>
    <a class="navbar-brand" href="/reader_searchbook(no)"  style="color: white">Home</a>
</nav>
</nav>
<div>
    <div class="footer">
        <div>
            <a class="navbar-brand" style="color: white;font-size: 30px;font-family: 'Book Antiqua';
            margin-top:1%;margin-left: 10% ">
                <i class="fa fa-cloud fa-lg"></i>Libraby</a>
        </div>
        <p>Shan ICP Number 18018134 | Powered by 1713011</p>
    </div>
</div>
<div id="section">
    <div class="content clearfix">
        <p class="saying" style="text-align: center; font-size: 50px;font-weight: bold; font-family: Pristina;  margin-top: 15%;">
            Welcome To Librarian's Homepage
        </p>
        <div class="search-box">
            <i class="iconfont icon-sousuo"></i>
            <input type="text" name="bookname" placeholder="Type to search" required >
            <button id="btn" onclick="searchbook()">Search</button>
        </div>
    </div>
    <br>

</div>
<script type="text/javascript">
    function searchbook(){
        var book = $("[name=bookname]").val();
        if(book != ""){
            window.location.href = "/reader_search_result_no?bname="+book;
        }else{
            $("#message").html("The book name cannot be empty!");
            $("#tanchuceng").css("display","block");
        }
    }
    function exit(){
        $("#tanchuceng").css("display","none");
    }
    $(function(){
        $.ajax({
            url : "/refresh",
            type : "post",
            data: {},
            success : function(data){
                if(data == "yes"){
                    console.log("refresh succeed!");
                }
            }
        })
    })
</script>
</body>
</html>